package com.softwarerusher.model;

/**
 * TSelldetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TSelldetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer selldetailNum;
	private TSell TSell;

	// Constructors

	/** default constructor */
	public TSelldetailId() {
	}

	/** full constructor */
	public TSelldetailId(TBook TBook, Integer selldetailNum, TSell TSell) {
		this.TBook = TBook;
		this.selldetailNum = selldetailNum;
		this.TSell = TSell;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getSelldetailNum() {
		return this.selldetailNum;
	}

	public void setSelldetailNum(Integer selldetailNum) {
		this.selldetailNum = selldetailNum;
	}

	public TSell getTSell() {
		return this.TSell;
	}

	public void setTSell(TSell TSell) {
		this.TSell = TSell;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TSelldetailId))
			return false;
		TSelldetailId castOther = (TSelldetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getSelldetailNum() == castOther.getSelldetailNum()) || (this
						.getSelldetailNum() != null
						&& castOther.getSelldetailNum() != null && this
						.getSelldetailNum()
						.equals(castOther.getSelldetailNum())))
				&& ((this.getTSell() == castOther.getTSell()) || (this
						.getTSell() != null
						&& castOther.getTSell() != null && this.getTSell()
						.equals(castOther.getTSell())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37
				* result
				+ (getSelldetailNum() == null ? 0 : this.getSelldetailNum()
						.hashCode());
		result = 37 * result
				+ (getTSell() == null ? 0 : this.getTSell().hashCode());
		return result;
	}

}